#!/usr/bin/perl -w

$in = "3AL4.pdb";
$out = "3AL4_st-aa.pdb";

open FIN, $in;
open FOUT, ">", $out;

while(<FIN>)
{
	# according to HET / HETNAM of PDB file.
	# also from 'Unrecognized_molecules.txt' of FoldX.
	if(/\sNAG\s/)
	{
		print "NAG found\n"; #
	}
	elsif(/\sBMA\s/)
	{
		print "BAM found\n"; #
	}
	else
	{
		print FOUT $_; #
	}
}
